# 埃及分数的解法是没执行一次计算，就找出一个分子为1的最大分数
# 参考 https://www.jianshu.com/p/da04c77e11d0
# README 有介绍
# 辗转相除法得到真分数
def EgyptFractional(a, b):
    Str = ''
    while a >= 1:
        L = DivideAndTurn(a, b)
        if L[1] == 1:
            if len(Str) == 0:
                Str = Str + '1' + '/' + str(L[0])
                break
            else:
                Str = Str + '+' + '1' + '/' + str(L[0])
                break 
        else:
            if len(L) != 1:
                L = Maxdivide(L[1], L[0])
            a = L[0]
            b = L[1]
            if len(Str) == 0:
                Str = Str + '1' + '/' + str(L[2])
            else:
                Str = Str + '+' + '1' + '/' + str(L[2])
    return Str

def Maxdivide(Son, Fat):
    if Fat > Son > 1:
        e = Fat//Son+1
        Son = Son*e -Fat
        Fat = Fat*e
    elif Fat > Son == 1:
        e = Fat
        Son = Son
        Fat = Fat
    return [Son, Fat, e]

def DivideAndTurn(x, y):
    if x > y:
        Max = x
        Min = y
    else:
        Max = y
        Min = x
    x = Max
    y = Min
    i = Max%Min
    if i != 0:
        while i > 0:
            Max = Min
            Min = i
            i = Max%Min
    y = int(y/Min)
    x = int(x/Min)
    if x != y:
        return [x, y]
    else:
        return [1]
while True:
    try:
        L = list(map(int,input().split("/")))
        print(EgyptFractional(int(L[0]), int(L[1])))
    except: break
